var page = 0;//页数
var length = 15;//每页加载数
var end = false;//已到最后一页
var loading = false;//加载状态，若还在加载就不请求数据
var param;
$(function(){
	var range = 10;           //距下边界长度/单位px
	setParam();
	//初始加载并加载到页面出现滚动条
	setInterval('fixHeight()',100);
	$(window).scroll(function(){
		if(end||loading)
		{
			return;
		}
		var srollPos = $(window).scrollTop();    //滚动条距顶部距离(页面超出窗口的高度)
		var totalheight = parseFloat($(window).height()) + parseFloat(srollPos);
		if(($(document).height()-range) <= totalheight) {
			appendAnime();
		}
	});
});
//加载动漫直到页面出现滚动条
function fixHeight()
{
	if(end)
	{
		return;
	}
	//ie文档高度与窗口高度相差4。与chrome、firefox不一样。
	if(!loading&&$(document).height()<=($(window).height()+4))
	{
		appendAnime();
	}
}
function setParam()
{
	if(search!='')
	{
		param = 'search='+search;
	}
	if(typeCode!='')
	{
		param = 'typeCode='+typeCode;
	}
	if(cvId!='0')
	{
		param = 'cvId='+cvId;
	}
	if(state!='')
	{
		param = 'state='+state;
	}
}